/**
 * @author lk
 * @date 2022/6/7 18:26
 */
package com.mmall.thread;

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Collections;
import java.util.stream.Collectors;
import java.util.stream.Stream;

public class FilesTest01 {
    public static void main(String[] args) throws IOException {
        String name = "G:\\Project\\java\\spring_learning_0515\\05-learn-java\\src\\main\\java\\com\\mmall\\thread\\abc";
        Path path = Path.of(name);
        System.out.println("Files.notExists(name) = " + Files.notExists(path));
        Path directories = Files.createDirectories(path);
        System.out.println(directories);
        System.out.println("Collections.emptyList() = " + Collections.emptyList());
        Stream<Path> list = Files.list(path);
        list.filter(e -> true)
                .collect(Collectors.toList())
                .forEach(System.out::println);
    }
}
